package com.codemonkey.lq.qd.facotry.config;


import com.codemonkey.lq.qd.facotry.config.executer.ActionHandler;

/**
 * 本类没有仿造spring-beans,放到同级support子包中,
 * 因为同意httl作者的观点,此类作为抽象类,有足够的稳定性.
 * @author LQ
 *
 */
public abstract class AbstractActionDefinition implements ActionDefinition {

	private String name;

	private String result;

	private String parameter;

	private String resultType;

	private String sqlId;

	private String sqlType;

	private boolean isPage;

	private String condition;

	private ActionHandler handler;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	@Override
	public String getParameter() {
		return parameter;
	}

	public void setParameter(String parameter) {
		this.parameter = parameter;
	}

	@Override
	public String getResultType() {
		return resultType;
	}

	public void setResultType(String resultType) {
		this.resultType = resultType;
	}

	@Override
	public String getSqlId() {
		return sqlId;
	}

	public void setSqlId(String sqlId) {
		this.sqlId = sqlId;
	}

	@Override
	public String getSqlType() {
		return sqlType;
	}

	/**
	 * @param sqlType  直接取值于 org.apache.ibatis.mapping.SqlCommandType
	 */
	public void setSqlType(String sqlType) {
		this.sqlType = sqlType;
	}

	@Override
	public boolean isPage() {
		return isPage;
	}

	public void setPage(boolean isPage) {
		this.isPage = isPage;
	}

	@Override
	public String getCondition() {
		return condition;
	}

	public void setCondition(String condition) {
		this.condition = condition;
	}

	@Override
	public ActionHandler getHandler() {
		return handler;
	}

	public void setHandler(ActionHandler handler) {
		this.handler = handler;
	}
	
	@Override
	public String toString() {
		return String.format("[ %s ]", this.getName());
	}
}
